//############################################################################
//
// EZFB ~ Linux Frame Buffer API ~
//
// by James Lehman
// james@akrobiz.com
//
// began: Feb. 2001
//
// EZFB is intended to give C programmers an easy-to-use library of functions
// for drawing points, lines and strings of characters into the Linux frame
// buffer. It also provides a means of displaying bitmap images on any portion
// of the screen and capturing the contents of any portion of the screen to
// a standard bitmap graphics file. All of this is embodied in a set of
// functions that are polymorphic with regard to the characteristics of the
// frame buffer and the bitmap files used. In other words, it makes no
// difference what the screen height or width is or what the color depth is,
// all of the function calls are the same and will have appropriate and
// predictable effects.
//
// This software is distributed in the hope that it will be useful, but
// without any warranty; without even the implied warranty of merchantability
// or fitness for a particular purpose. See the GNU General Public License
// for more details.
//
//############################################################################

#ifndef __EZFB_MACRO_DEFINITIONS__
#define __EZFB_MACRO_DEFINITIONS__
#define EZFB_FAIL_CREATE_DD			-1
#define EZFB_FAIL_SET_FULLSCREEN	-2
#define EZFB_FAIL_GET_DD_INFO		-3
#define EZFB_FAIL_CREATE_DDS		-4

#define EZFB_TRUE					1
#define EZFB_FALSE					0

#define EZFB_LOCK(fb) (fb->dds_ptr)->Lock(0, &(fb->dds_desc), DDLOCK_WAITNOTBUSY, 0)
#define EZFB_MAP(fb)  (fb->vga_ptr) = (unsigned short *)(fb->dds_desc.lpSurface) ; 
#define EZFB_UNLOCK(fb) (fb->dds_ptr)->Unlock(0)
#endif

